 /**
 * @(#) StartupCommand.as
 *
 * @date		2010. 09. 08.
 * @version		1.0
 * @author		Shin, Yunwoo
 * @client		Network O&S 
 * @description	Application 시작을 처리하는 Command
 */

package com.skt.common_hr.approval_nos.controller
{
	import com.skt.common_hr.approval_nos.model.ApprovalDetailProxy;
	import com.skt.common_hr.approval_nos.model.DeputyProxy;
	import com.skt.common_hr.approval_nos.model.PreApprovalProxy;
	import com.skt.common_hr.approval_nos.model.ToApprovalProxy;
	import com.skt.common_hr.approval_nos.view.ApprovalMediator;
	
	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;

	public class StartupCommand extends SimpleCommand implements ICommand
	{
		
		override public function execute(note:INotification):void
		{
			var app:ApprovalNos = note.getBody() as ApprovalNos;
			//trace("execute startupCommand");
			
			facade.registerProxy(new ToApprovalProxy());
			facade.registerProxy(new PreApprovalProxy());
			facade.registerProxy(new ApprovalDetailProxy());
			facade.registerProxy(new DeputyProxy());
			//facade.registerProxy(new ProfileDetailProxy());
			
			// MVC 모델중 View와 관련한 mediator들을 등록한다.
			facade.registerMediator(new ApprovalMediator(app.overView));
		}
	}
}